﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using WuDada.Core.SystemApplications.Domain;
using WuDada.Core.SystemApplications;
using WuDada.Core.SystemApplications.Service;
using System.Globalization;
using WuDada.Core.Generic.Mail;
using WuDada.Trade.DataLoader.Service;
using WuDada.Trade.DataLoader.Utility;
using WuDada.Trade.DataLoader.Domain;

namespace DataLoader.Test.Service
{
    [TestFixture]
    public class InitWebDataService
    {
        private TradeDataLoaderFactory m_TradeDataLoaderFactory { get; set; }
        private SystemFactory m_SystemFactory { get; set; }
        private IDataLoadService m_DataLoadService { get; set; }
        private ISystemService m_SystemService { get; set; }

        [TestFixtureSetUp]
        public void TestCaseInit()
        {
            m_TradeDataLoaderFactory = new TradeDataLoaderFactory();
            m_SystemFactory = new SystemFactory();
            m_DataLoadService = m_TradeDataLoaderFactory.GetDataLoadService();
            m_SystemService = m_SystemFactory.GetSystemService();
        }

        [Test]
        public void InitWebData()
        {
            
        }

        [Test]
        public void TestGoogleStockDataConvertUtil()
        {
            string strDate = "Aug 24, 2012";
            DateTime date = GoogleStockDataConvertUtil.ToDateTime(strDate);
            Console.WriteLine("date = " + date.ToShortDateString());
        }

        [Test]
        public void TestGetStockData()
        {
            StockDataVO stockDataVO = m_DataLoadService.GetStockDataById(31);
            Console.WriteLine("stockDataVO = " + stockDataVO.OpenValue);
        }
    }
}
